package vo;

import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @program: sporadic
 * @description:
 * @author: LHD   QQ:1727865856
 * @create: 2019-10-15 14:24
 **/
@Data
@NoArgsConstructor
public class ResponseData<T> {
    private Integer statusCode; //返回状态码
    private String msg; //消息
    private T body;

    public ResponseData(T body){
        this.statusCode=HttpStatus.SUCCEESS;
        this.msg="成功";
        this.body=body;
    }
    public ResponseData(T body,String msg){
        this.statusCode=HttpStatus.ERROR;
        this.msg=msg;
        this.body=body;
    }
    public interface  HttpStatus{
        Integer SUCCEESS=200;
        Integer ERROR=500;
    }

}
